﻿using System;
using biz.ritter.javapi.nio;
using Nofs.Fuse;


namespace Nofs.Net.Fuse
{
    public interface IFileDataHandler
    {
        //FuseException
        int open(String path, int flags, FuseOpenSetter openSetter);

        //FuseException
        int release(String path, Object fh, int flags);

        //FuseException
        int read(String path, Object fh, ByteBuffer buf, long offset);

        //FuseException
        int write(String path, Object fh, Boolean isWritePage, ByteBuffer buf, long offset);

        //FuseException
        int flush(String path, Object fileHandle);

        //FuseException
        int truncate(String path, long length);

        //Exception
        void CleanUp();

        //FuseException
        void Sync();
    }
}
